﻿using System;
using System.Collections.Generic;

using System.Text;


public enum LogType { отправка, получение, событие, ошибка }
public class Log : HaveHashByte
{
    public DateTime dt;
    public string message;
    public LogType type;

    public Log(LogType _type,  string _mess)
    {
        dt = DateTime.Now;
        type = _type;
        message = _mess;
    }

    public byte[] Hash
    {
        get
        {
            return BitConverter.GetBytes(dt.ToBinary());
        }
    }

    public override string ToString()
    {
        return dt.ToLongTimeString().Split(' ')[1] + " " + type.ToString() + " " + message;
    }
}

